#!/bin/bash

set -x

# dir="/mnt/yanyi/ceph/build"
# cd ${dir}

# create mon keyring
bin/ceph-authtool --create-keyring /etc/ceph/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
sleep 1

# create admin keyring
bin/ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' --cap mgr 'allow *'
sleep 1

# add admin keyring into mon keyring
bin/ceph-authtool /etc/ceph/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
